function res = fun_finder_plot(theta,phi,psi,t,L,L2 ,R2,M,g)
minratio = .01;
maxratio = .99;
n = 1000;

    ratios=linspace(minratio,maxratio,n);
    L1s=ratios*L;
    Rs=L-L1s;
      mratio = linspace(.7,.9,5);
    
    for j=1:length(mratio)
        M1 = mratio(j)*M;
        M2 = M-M1;
    
    for i=1:n
        range(i)=trebufunV3_rangefinder(theta,phi,psi,t,Rs(i),R2,L1s(i), L2,M1,M2,g);
    end
     MAP(j,:) = range;
    disp(max(range));

    end
       res=MAP;
    
     pcolor(ratios,mratio,MAP);  
     shading interp
    colorbar
    
end
%200,280,50,30,4.6929,2,15.3071,4,500,10,9.8
%200,280,50,30,20,4,2,500,9.8